var express = require('express');

var router = express.Router();
var db=require('../M/db.js')

router.post('/', async (req,res,next) =>{//注册

    var navs=await db.cha('nav',req.body)
    // console.log(req.body);
    var aaa=req.body
    // res.redirect('/')
    res.send({
        code:200,
        aaa
    })
})
// router.post('/aaa', async (req,res,next) =>{//登录

//     var navs=await db.find('nev',req.body)
//     console.log(111);
//     console.log(navs);
//     // console.log(req.body);
//     // res.redirect('/')
//     res.send(req.body)
// })

    module.exports=router